home *** CD-ROM | disk | FTP | other *** search
- /* tosystem.c 20Aug89 */
- /* int system(); supplied by TRBurkey for uumail port to MWC on ATARI-ST */
- /* This is a featureless shell function, providing status response only. */
- /* usage: System("program_name arg1 arg2 arg3 etc. "); */
-
- #include <osbind.h>
- #include <string.h>
-
- int system(string) char *string; {
- int k, i, loadgo = 0;
- char pname[200],ptal[200];
- strcpy(pname,string);
- k=strlen(pname);
- for(i = 0; i < k && pname[i] != ' ' ; i++);
- if(pname[i]==' ') {
- pname[i]='\0';
- strcpy(ptal,&string[i]);
- ptal[0]=strlen(ptal);
- } else {
- ptal[0]=0;
- ptal[1]='\0';
- }
- return((int)(Pexec(loadgo,pname,ptal,"PATH=\0A:\\\0")));
- }
-
-